c program to find maximum and minimum of an array